package com.yxym.homework06;

public class homework06 {
    public static void main(String[] args) {
        CheckingAccount checkingAccount = new CheckingAccount(100);
        checkingAccount.deposit(10.0);
        System.out.println(checkingAccount.getBalance());
        checkingAccount.withdraw(20.0);
        System.out.println(checkingAccount.getBalance());
        SavingsAccount savingsAccount = new SavingsAccount(1000, 3,0.05);
        savingsAccount.deposit(100);
        savingsAccount.deposit(100);
        savingsAccount.deposit(100);
        System.out.println(savingsAccount.getBalance());
        savingsAccount.earnMonthlyInterest();//统计利息
        System.out.println(savingsAccount.getBalance());
        savingsAccount.withdraw(100);//免手续
        System.out.println(savingsAccount.getBalance());
        savingsAccount.deposit(100);//扣手续费
        System.out.println(savingsAccount.getBalance());
    }
}
